home *** CD-ROM | disk | FTP | other *** search
- /* ------------------------------------------------------------------------------
- FILENAME
- UniversalMessageIntf.h
-
- DESCRIPTION
- This module contains the constant and type declarations for the
- UniversalMessageIntf.c file. That file contains the routines which override
- the universal imaging messages that are supported by the LaserWriterSC
- driver.
-
- COPYRIGHT
- Copyright Apple Computer, Inc. 1989-1993
- All rights reserved.
-
- -------------------------------------------------------------------------------- */
-
- #ifndef __UNIVERSALMESSAGEINTF__
- #define __UNIVERSALMESSAGEINTF__
-
- /*********************************************************************************
- * CONSTANTS *
- *********************************************************************************/
-
- #define kSilentError 3 /* Positive error code to suppress job failure alert. */
-
- // Constants for knowing the max. limits of paper sizes
- enum
- {
- kMaxPageWidth = ff(8 * 300),
- kMaxLetterPageHeight = ff(10 * 300 + 180),
- kMaxA4PageHeight = ff(11 * 300 + 75),
- kMaxLegalPageHeight = ff(12 * 300),
- kMaxPaperWidth = ff(8 * 300 + 150),
-
- kMinSCTopMargin = 0x0076, // minimum top margin supported by printer
- kMinSCLeftMargin = 0x000E, // minimum left margin for 8.5" width
-
- kUSLetterWidth = ff(8 * 72 + 36),
- kUSLetterHeight = ff(11 * 72),
-
- kUSLegalWidth = ff(8 * 72 + 36),
- kUSLegalHeight = ff(14 * 72),
-
- kA4LetterWidth = ff(8 * 72 + 18),
- kA4LetterHeight = 0x034800A8,
-
- kB5LetterWidth = 0x01F300E0,
- kB5LetterHeight = 0x02C3FF58,
-
- kEnvelopeWidth = ff(4 * 72 + 9),
- kEnvelopeHeight = ff(9 * 72 + 36)
- };
-
-
- /*********************************************************************************
- * TYPES *
- *********************************************************************************/
-
- // SpecGlobalsRec - Structure containing the LaserWriterSC's global variables
-
- typedef struct
- {
- gxRasterImageDataHdl hImageData; // image data for a page
- gxFormat pageFormat; // current page format we are printing
- short deviceNum; // SCSI device number of device we're connected to
- short lastSCSIStatus; // last status returned from a call to SCSIComplete
- long timeoutForSCSIComplete; // timeout in ticks to use in calls to SCSIComplete
- short scsiCommand[3]; // next SCSI command to execute
- short drawbitsParams[5]; // rectangle and transfer mode parameters used in the SC draw bits command
- Boolean haveDrawBitsParams; // T => SD_CheckStatus routine has already received the DrawBits parameters;
- // This implies the data coming into SD_CheckStatus is the bitmap data
- Boolean printedAPage; // T => driver has started printing a page; F => driver hasn't yet printed a page
- gxFormat lastPageFormat; // Format associated with the last page the driver printed
- } SpecGlobalsRec,
- *SpecGlobalsPtr,
- **SpecGlobalsHdl;
-
-
- /*********************************************************************************
- * DEFINES *
- *********************************************************************************/
-
- #define kSpecGlobalsRecLen sizeof(SpecGlobalsRec)
-
- // F2S - for converting fixed numbers to shorts
- #define F2S(a) FixedToInt(a)
-
- #endif __UNIVERSALMESSAGEINTF__